<template>
	<view class="warp">
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">时间</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">时柱</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">日柱</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">月柱</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">年柱</text>
				</uni-grid-item>

			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">十神</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">{{sss}}</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">日元</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">{{yss}}</text>
				</uni-grid-item>
				<uni-grid-item>

					<text class="text">{{nss}}</text>
				</uni-grid-item>

			</uni-grid>
		</view>

		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">天干</text>
				</uni-grid-item>
				<uni-grid-item marker="dot">

					<text class="text" :sgindex="sgindex" :range="tg" range-key="name">{{tg[sgindex].name}}{{sgindex}}</text>
				</uni-grid-item>
				<uni-grid-item marker="badge" text="99" type="success">

					<text class="text" :value="rgindex" :range="tg" range-key="name">{{tg[rgindex].name}}{{rgindex}}</text>
				</uni-grid-item>
				<uni-grid-item marker="badge" type="error" text="热">

					<text class="text" :value="ygindex" :range="tg" range-key="name">{{tg[ygindex].name}}{{ygindex}}</text>
				</uni-grid-item>
				<uni-grid-item :hor="35" :ver="-45" :img-width="25" marker="image" src="https://img-cdn-qiniu.dcloud.net.cn/uni-ui/recommend.png">

					<text class="text" :value="ngindex" :range="tg" range-key="name">{{tg[ngindex].name}}{{ngindex}}</text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">地支</text>
				</uni-grid-item>
				<uni-grid-item marker="dot">

					<text class="text" :value="szindex" :range="dz" range-key="name">{{dz[szindex].name}}{{szindex}}</text>
				</uni-grid-item>
				<uni-grid-item marker="badge" text="99" type="success">

					<text class="text" :value="rzindex" :range="dz" range-key="name">{{dz[rzindex].name}}{{rzindex}}</text>
				</uni-grid-item>
				<uni-grid-item marker="badge" type="error" text="热">

					<text class="text" :value="yzindex" :range="dz" range-key="name">{{dz[yzindex].name}}{{yzindex}}</text>
				</uni-grid-item>
				<uni-grid-item :hor="35" :ver="-45" :img-width="25" marker="image" src="https://img-cdn-qiniu.dcloud.net.cn/uni-ui/recommend.png">

					<text class="text" :value="nzindex" :range="dz" range-key="name">{{dz[nzindex].name}}{{nzindex}}</text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">藏干</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{tg[szcg].name}}</text>
					<text class="text">{{tg[szcg1].name}}</text>
					<text class="text">{{tg[szcg2].name}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{tg[rzcg].name}}</text>
					<text class="text">{{tg[rzcg1].name}}</text>
					<text class="text">{{tg[rzcg2].name}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{tg[yzcg].name}}</text>
					<text class="text">{{tg[yzcg1].name}}</text>
					<text class="text">{{tg[yzcg2].name}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{tg[nzcg].name}}</text>
					<text class="text">{{tg[nzcg1].name}}</text>
					<text class="text">{{tg[nzcg2].name}}</text>
				</uni-grid-item>

			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>

					<text class="text">副星</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rgszss}}</text>
					<text class="text">{{rgszss1}}</text>
					<text class="text">{{rgszss2}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rgrzss}}</text>
					<text class="text">{{rgrzss1}}</text>
					<text class="text">{{rgrzss2}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rgyzss}}</text>
					<text class="text">{{rgyzss1}}</text>
					<text class="text">{{rgyzss2}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rgnzss}}</text>
					<text class="text">{{rgnzss1}}</text>
					<text class="text">{{rgnzss2}}</text>
				</uni-grid-item>

			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>
					<text class="text">纳音</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{sny}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rny}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{yny}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{nny}}</text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>
					<text class="text">星运</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{scs}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{rcs}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{ycs}}</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text">{{ncs}}</text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>
					<text class="text">自坐</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>
					<text class="text">空亡</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
			</uni-grid>
		</view>
		<view class="example-body">
			<uni-grid :column="5" :show-border="true" :square="true" :hor="35" :ver="-45" @change="change">
				<uni-grid-item>
					<text class="text">神煞</text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
				<uni-grid-item>
					<text class="text"></text>
				</uni-grid-item>
			</uni-grid>
		</view>
	</view>
</template>

<script>
	import uniGrid from '@/components/uni-grid/uni-grid.vue'
	import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue'
	export default {
		components: {
			uniGrid,
			uniGridItem
		},
		data() {
			return {
				list: '',
				tg: [{
						name: '甲'
					},
					{
						name: '乙'
					},
					{
						name: '丙'
					},
					{
						name: '丁'
					},
					{
						name: '戊'
					},
					{
						name: '己'
					},
					{
						name: '庚'
					},
					{
						name: '辛'
					},
					{
						name: '壬'
					},
					{
						name: '癸'
					},
					{
						name: ''
					},
				],
				dz: [{
						name: '子',
					},
					{
						name: '丑'
					},
					{
						name: '寅'
					},
					{
						name: '卯'
					},
					{
						name: '辰'
					},
					{
						name: '巳'
					},
					{
						name: '午'
					},
					{
						name: '未'
					},
					{
						name: '申'
					},
					{
						name: '酉'
					},
					{
						name: '戌'
					},
					{
						name: '亥'
					},
				],
				sgindex: '',
				rgindex: '',
				ygindex: '',
				ngindex: '',
				szindex: '',
				rzindex: '',
				yzindex: '',
				nzindex: '',
				nss:'',
				yss:'',
				sss:'',
				nzcg:'',
				nzcg1:'',
				nzcg2:'',
				yzcg:'',
				yzcg1:'',
				yzcg2:'',
				rzcg:'',
				rzcg1:'',
				rzcg2:'',
				szcg:'',
				szcg1:'',
				szcg2:'',
				rgnzss:'',
				rgnzss1:'',
				rgnzss2:'',
				rgyzss:'',
				rgyzss1:'',
				rgyzss2:'',
				rgrzss:'',
				rgrzss1:'',
				rgrzss2:'',
				rgszss:'',
				rgszss1:'',
				rgszss2:'',
				nny:'',
				yny:'',
				rny:'',
				sny:'',
				ncs:'',
				ycs:'',
				rcs:'',
				scs:''
			}
		},

		onLoad() {

			uni.getStorage({
				key: 'paipan_key',
				success: data => {
					//console.log(data);
					this.list = data.data.data
					this.sgindex = data.data.data.tg[3]
					this.rgindex = data.data.data.tg[2]
					this.ygindex = data.data.data.tg[1]
					this.ngindex = data.data.data.tg[0]
					
					this.szindex = data.data.data.dz[3]
					this.rzindex = data.data.data.dz[2]
					this.yzindex = data.data.data.dz[1]
					this.nzindex = data.data.data.dz[0]
				},
			});
			//十神，日干和其他天干序号的组合，查询到对应数组的对象
			var rgng=this.rgindex.toString()+this.ngindex.toString()
			var rgyg=this.rgindex.toString()+this.ygindex.toString()
			var rgsg=this.rgindex.toString()+this.sgindex.toString()
			console.log(rgng,rgyg,rgsg)
			
			var ssarr, x 
			ssarr = [{id:'00',name:'比肩'},{id:'01',name:'劫财'},{id:'02',name:'食神'},{id:'03',name:'伤官'},{id:'04',name:'偏财'},{id:'05',name:'正财'},{id:'06',name:'七杀'},{id:'07',name:'正官'},{id:'08',name:'偏印'},{id:'00',name:'正印'},
			         {id:'10',name:'劫财'},{id:'11',name:'比肩'},{id:'12',name:'伤官'},{id:'13',name:'食神'},{id:'14',name:'正财'},{id:'15',name:'偏财'},{id:'16',name:'正官'},{id:'17',name:'七杀'},{id:'18',name:'正印'},{id:'19',name:'偏印'},
					 {id:'20',name:'偏印'},{id:'21',name:'正印'},{id:'22',name:'比肩'},{id:'23',name:'劫财'},{id:'24',name:'食神'},{id:'25',name:'伤官'},	{id:'26',name:'偏财'},{id:'27',name:'正财'},{id:'28',name:'七杀'},{id:'29',name:'正官'},								 
					 {id:'30',name:'正印'},{id:'31',name:'偏印'},{id:'32',name:'劫财'},{id:'33',name:'比肩'},{id:'34',name:'伤官'},{id:'35',name:'食神'},	{id:'36',name:'正财'},{id:'37',name:'偏财'},{id:'38',name:'正官'},{id:'39',name:'七杀'},
					 {id:'40',name:'七杀'},{id:'41',name:'正官'},{id:'42',name:'偏印'},{id:'43',name:'正印'},{id:'44',name:'比肩'},{id:'45',name:'劫财'},{id:'46',name:'食神'},{id:'47',name:'伤官'},{id:'48',name:'七杀'},{id:'49',name:'正官'}, 
					 {id:'50',name:'正官'},{id:'51',name:'七杀'},{id:'52',name:'正印'},{id:'53',name:'偏印'},{id:'54',name:'劫财'},{id:'55',name:'比肩'},{id:'56',name:'伤官'},{id:'57',name:'食神'},{id:'58',name:'正官'},{id:'59',name:'七杀'},
					 {id:'60',name:'偏财'},{id:'61',name:'正财'},{id:'62',name:'七杀'},{id:'63',name:'正官'},{id:'64',name:'偏印'},{id:'65',name:'正印'},{id:'66',name:'比肩'},{id:'67',name:'劫财'},{id:'68',name:'食神'},{id:'69',name:'伤官'},
					 {id:'70',name:'正财'},{id:'71',name:'偏财'},{id:'72',name:'正官'},{id:'73',name:'七杀'},{id:'74',name:'正印'},{id:'75',name:'偏印'},{id:'76',name:'劫财'},{id:'77',name:'比肩'},{id:'78',name:'伤官'},{id:'79',name:'食神'},
					 {id:'80',name:'食神'},{id:'81',name:'伤官'},{id:'82',name:'偏财'},{id:'83',name:'正财'},{id:'84',name:'七杀'},{id:'85',name:'正官'},{id:'86',name:'偏印'},{id:'87',name:'正印'},{id:'88',name:'比肩'},{id:'89',name:'劫财'},
					 {id:'90',name:'伤官'},{id:'91',name:'食神'},{id:'92',name:'正财'},{id:'93',name:'偏财'},{id:'94',name:'正官'},{id:'95',name:'七杀'},{id:'96',name:'正印'},{id:'97',name:'偏印'},{id:'98',name:'劫财'},{id:'99',name:'比肩'},
					 {id:'010',name:''},{id:'110',name:''},{id:'210',name:''},{id:'310',name:''},{id:'410',name:''},{id:'510',name:''},{id:'610',name:''},{id:'710',name:''},{id:'810',name:''},{id:'910',name:''},
					 ]

			var data= ssarr.filter(function(item){
			     return item.id == rgng; 
			})
			var data1= ssarr.filter(function(item){
			     return item.id == rgyg; 
			})
			var data2= ssarr.filter(function(item){
			     return item.id == rgsg; 
			})
			console.log(data);
			this.nss=data[0].name
			this.yss=data1[0].name
			this.sss=data2[0].name
			//藏干，思路，获取地支id，先写一个地支藏干数组，然后从数组中用filter查询到对应id的对象，对象中包含地支藏干，然后组合判断出副星
			var datacg= [[9,10,10],[9,7,5],[0,2,4],[1,10,10],[1,4,9],[6,2,4],[3,5,10],[1,5,3],[6,8,4],[7,10,10],[7,3,4],[8,0,10]]
			this.nzcg = datacg[this.nzindex][0]
			this.nzcg1 = datacg[this.nzindex][1]
			this.nzcg2 = datacg[this.nzindex][2]
			this.yzcg = datacg[this.yzindex][0]
			this.yzcg1 = datacg[this.yzindex][1]
			this.yzcg2 = datacg[this.yzindex][2]
			this.rzcg = datacg[this.rzindex][0]
			this.rzcg1 = datacg[this.rzindex][1]
			this.rzcg2 = datacg[this.rzindex][2]
			this.nzcg = datacg[this.nzindex][0]
			this.nzcg1 = datacg[this.nzindex][1]
			this.nzcg2 = datacg[this.nzindex][2]
			this.szcg = datacg[this.szindex][0]
			this.szcg1 = datacg[this.szindex][1]
			this.szcg2 = datacg[this.szindex][2]
			console.log(this.nzcg,this.nzcg1,this.nzcg2)
			console.log(this.ngindex)
			//十神副星，年干
			var rgnz=this.rgindex.toString()+datacg[this.nzindex][0].toString()
			var rgnz1=this.rgindex.toString()+datacg[this.nzindex][1].toString()
			var rgnz2=this.rgindex.toString()+datacg[this.nzindex][2].toString()
			var rgnzdata= ssarr.filter(function(item){
			     return item.id == rgnz; 
			})
			var rgnz1data= ssarr.filter(function(item){
			     return item.id == rgnz1; 
			})
			var rgnz2data= ssarr.filter(function(item){
			     return item.id == rgnz2; 
			})
			this.rgnzss=rgnzdata[0].name
			this.rgnzss1=rgnz1data[0].name
			this.rgnzss2=rgnz2data[0].name
			//十神副星，月干
			var rgyz=this.rgindex.toString()+datacg[this.yzindex][0].toString()
			var rgyz1=this.rgindex.toString()+datacg[this.yzindex][1].toString()
			var rgyz2=this.rgindex.toString()+datacg[this.yzindex][2].toString()
			var rgyzdata= ssarr.filter(function(item){
			     return item.id == rgyz; 
			})
			var rgyz1data= ssarr.filter(function(item){
			     return item.id == rgyz1; 
			})
			var rgyz2data= ssarr.filter(function(item){
			     return item.id == rgyz2; 
			})
			this.rgyzss=rgyzdata[0].name
			this.rgyzss1=rgyz1data[0].name
			this.rgyzss2=rgyz2data[0].name
			//十神副星，日干
			var rgrz=this.rgindex.toString()+datacg[this.rzindex][0].toString()
			var rgrz1=this.rgindex.toString()+datacg[this.rzindex][1].toString()
			var rgrz2=this.rgindex.toString()+datacg[this.rzindex][2].toString()
			var rgrzdata= ssarr.filter(function(item){
			     return item.id == rgrz; 
			})
			var rgrz1data= ssarr.filter(function(item){
			     return item.id == rgrz1; 
			})
			var rgrz2data= ssarr.filter(function(item){
			     return item.id == rgrz2; 
			})
			this.rgrzss=rgrzdata[0].name
			this.rgrzss1=rgrz1data[0].name
			this.rgrzss2=rgrz2data[0].name
			//十神副星，时干
			var rgsz=this.rgindex.toString()+datacg[this.szindex][0].toString()
			var rgsz1=this.rgindex.toString()+datacg[this.szindex][1].toString()
			var rgsz2=this.rgindex.toString()+datacg[this.szindex][2].toString()
			var rgszdata= ssarr.filter(function(item){
			     return item.id == rgsz; 
			})
			var rgsz1data= ssarr.filter(function(item){
			     return item.id == rgsz1; 
			})
			var rgsz2data= ssarr.filter(function(item){
			     return item.id == rgsz2; 
			})
			this.rgszss=rgszdata[0].name
			this.rgszss1=rgsz1data[0].name
			this.rgszss2=rgsz2data[0].name
			//六十花甲子纳音，天干加地支
			var jzarr = [{id:'00',name:'甲子',nayin:'海中金'},{id:'11',name:'乙丑',nayin:'海中金'},{id:'22',name:'丙寅',nayin:'炉中火'},{id:'33',name:'丁卯',nayin:'炉中火'},{id:'44',name:'戊辰',nayin:'大林木'},{id:'55',name:'己巳',nayin:'大林木'},{id:'66',name:'庚午',nayin:'路旁土'},{id:'77',name:'辛未',nayin:'路旁土'},{id:'88',name:'壬申',nayin:'剑锋金'},{id:'99',name:'癸酉',nayin:'剑锋金'},
			             {id:'010',name:'甲戌',nayin:'山头火'},{id:'111',name:'乙亥',nayin:'山头火'},{id:'20',name:'丙子',nayin:'涧下水'},{id:'31',name:'丁丑',nayin:'涧下水'},{id:'42',name:'戊寅',nayin:'城头土'},{id:'53',name:'己卯',nayin:'城头土'},{id:'64',name:'庚辰',nayin:'白蜡金'},{id:'75',name:'辛巳',nayin:'白蜡金'},{id:'86',name:'壬午',nayin:'杨柳木'},{id:'97',name:'癸未',nayin:'杨柳木'},
						 {id:'08',name:'甲申',nayin:'井泉水'},{id:'19',name:'乙酉',nayin:'井泉水'},{id:'210',name:'丙戌',nayin:'屋上土'},{id:'311',name:'丁亥',nayin:'屋上土'},{id:'40',name:'戊子',nayin:'霹雳火'},{id:'51',name:'己丑',nayin:'霹雳火'},{id:'62',name:'庚寅',nayin:'松柏木'},{id:'73',name:'辛卯',nayin:'松柏木'},{id:'84',name:'壬辰',nayin:'长流水'},{id:'95',name:'癸巳',nayin:'长流水'},
						 {id:'06',name:'甲午',nayin:'砂中金'},{id:'17',name:'乙未',nayin:'砂中金'},{id:'28',name:'丙申',nayin:'山下火'},{id:'39',name:'丁酉',nayin:'山下火'},{id:'410',name:'戊戌',nayin:'平地木'},{id:'511',name:'己亥',nayin:'平地木'},{id:'60',name:'庚子',nayin:'壁上土'},{id:'71',name:'辛丑',nayin:'壁上土'},{id:'82',name:'壬寅',nayin:'金箔金'},{id:'93',name:'癸卯',nayin:'金箔金'},
						 {id:'04',name:'甲辰',nayin:'覆灯火'},{id:'15',name:'乙巳',nayin:'覆灯火'},{id:'26',name:'丙午',nayin:'天河水'},{id:'37',name:'丁未',nayin:'天河水'},{id:'48',name:'戊申',nayin:'大驿木'},{id:'59',name:'己酉',nayin:'大驿木'},{id:'610',name:'庚戌',nayin:'钗钏金'},{id:'711',name:'辛亥',nayin:'钗钏金'},{id:'80',name:'壬子',nayin:'桑拓木'},{id:'91',name:'癸丑',nayin:'桑拓木'},
						 {id:'02',name:'甲寅',nayin:'大溪水'},{id:'13',name:'乙卯',nayin:'大溪水'},{id:'24',name:'丙辰',nayin:'砂中土'},{id:'35',name:'丁巳',nayin:'砂中土'},{id:'46',name:'戊午',nayin:'天上火'},{id:'57',name:'己未',nayin:'天上火'},{id:'68',name:'庚申',nayin:'石榴木'},{id:'79',name:'辛酉',nayin:'石榴木'},{id:'810',name:'壬戌',nayin:'大海水'},{id:'911',name:'癸亥',nayin:'大海水'},
						 ]
			var ngnz=this.ngindex.toString()+this.nzindex.toString()
			var ygyz=this.ygindex.toString()+this.yzindex.toString()
			var rgrz=this.rgindex.toString()+this.rzindex.toString()
			var sgsz=this.sgindex.toString()+this.szindex.toString()
			var ngnzdata= jzarr.filter(function(item){
			     return item.id == ngnz; 
			})
			var ygyzdata= jzarr.filter(function(item){
			     return item.id == ygyz; 
			})
			var rgrzdata= jzarr.filter(function(item){
			     return item.id == rgrz; 
			})
			var sgszdata= jzarr.filter(function(item){
			     return item.id == sgsz; 
			})
		
			this.nny=ngnzdata[0].nayin
			this.yny=ygyzdata[0].nayin
			this.rny=rgrzdata[0].nayin
			this.sny=sgszdata[0].nayin
			//十二长生
			var csarr = [{id:'011',name:'甲亥',cs:'长生'},{id:'22',name:'丙寅',cs:'长生'},{id:'42',name:'戊寅',cs:'长生'},{id:'65',name:'庚巳',cs:'长生'},{id:'88',name:'壬申',cs:'长生'},{id:'16',name:'乙午',cs:'长生'},{id:'39',name:'丁酉',cs:'长生'},{id:'59',name:'己酉',cs:'长生'},{id:'70',name:'辛子',cs:'长生'},{id:'93',name:'癸卯',cs:'长生'},
			             {id:'00',name:'甲子',cs:'沐浴'},{id:'23',name:'丙卯',cs:'沐浴'},{id:'43',name:'戊卯',cs:'沐浴'},{id:'66',name:'庚午',cs:'沐浴'},{id:'89',name:'壬酉',cs:'沐浴'},{id:'15',name:'乙巳',cs:'沐浴'},{id:'38',name:'丁申',cs:'沐浴'},{id:'58',name:'己申',cs:'沐浴'},{id:'711',name:'辛亥',cs:'沐浴'},{id:'92',name:'癸寅',cs:'沐浴'},
						 {id:'01',name:'甲丑',cs:'冠带'},{id:'24',name:'丙辰',cs:'冠带'},{id:'44',name:'戊辰',cs:'冠带'},{id:'67',name:'庚未',cs:'冠带'},{id:'810',name:'壬戌',cs:'冠带'},{id:'14',name:'乙辰',cs:'冠带'},{id:'37',name:'丁未',cs:'冠带'},{id:'57',name:'己未',cs:'冠带'},{id:'710',name:'辛戌',cs:'冠带'},{id:'91',name:'癸丑',cs:'冠带'},
						 {id:'02',name:'甲寅',cs:'临官'},{id:'25',name:'丙巳',cs:'临官'},{id:'45',name:'戊巳',cs:'临官'},{id:'68',name:'庚申',cs:'临官'},{id:'811',name:'壬亥',cs:'临官'},{id:'13',name:'乙卯',cs:'临官'},{id:'36',name:'丁午',cs:'临官'},{id:'56',name:'己午',cs:'临官'},{id:'79',name:'辛酉',cs:'临官'},{id:'90',name:'癸子',cs:'临官'},
						 {id:'03',name:'甲卯',cs:'帝旺'},{id:'26',name:'丙午',cs:'帝旺'},{id:'46',name:'戊午',cs:'帝旺'},{id:'69',name:'庚酉',cs:'帝旺'},{id:'80',name:'壬子',cs:'帝旺'},{id:'12',name:'乙寅',cs:'帝旺'},{id:'35',name:'丁巳',cs:'帝旺'},{id:'55',name:'己巳',cs:'帝旺'},{id:'78',name:'辛申',cs:'帝旺'},{id:'911',name:'癸亥',cs:'帝旺'},
						 {id:'04',name:'甲辰',cs:'衰'},{id:'27',name:'丙未',cs:'衰'},{id:'47',name:'戊未',cs:'衰'},{id:'610',name:'庚戌',cs:'衰'},{id:'81',name:'壬丑',cs:'衰'},{id:'11',name:'乙丑',cs:'衰'},{id:'34',name:'丁辰',cs:'衰'},{id:'54',name:'己辰',cs:'衰'},{id:'77',name:'辛未',cs:'衰'},{id:'910',name:'癸戌',cs:'衰'},
						 {id:'05',name:'甲巳',cs:'病'},{id:'28',name:'丙申',cs:'病'},{id:'48',name:'戊申',cs:'病'},{id:'611',name:'庚亥',cs:'病'},{id:'82',name:'壬寅',cs:'病'},{id:'10',name:'乙子',cs:'病'},{id:'33',name:'丁卯',cs:'病'},{id:'53',name:'己卯',cs:'病'},{id:'76',name:'辛午',cs:'病'},{id:'99',name:'癸酉',cs:'病'},
						 {id:'06',name:'甲午',cs:'死'},{id:'29',name:'丙酉',cs:'死'},{id:'49',name:'戊酉',cs:'死'},{id:'60',name:'庚子',cs:'死'},{id:'83',name:'壬卯',cs:'死'},{id:'111',name:'乙亥',cs:'死'},{id:'32',name:'丁寅',cs:'死'},{id:'52',name:'已寅',cs:'死'},{id:'75',name:'辛巳',cs:'死'},{id:'98',name:'癸申',cs:'死'},
						 {id:'07',name:'甲未',cs:'墓'},{id:'210',name:'丙戌',cs:'墓'},{id:'410',name:'戊戌',cs:'墓'},{id:'61',name:'庚丑',cs:'墓'},{id:'84',name:'壬辰',cs:'墓'},{id:'110',name:'乙戌',cs:'墓'},{id:'31',name:'丁丑',cs:'墓'},{id:'51',name:'己丑',cs:'墓'},{id:'74',name:'辛辰',cs:'墓'},{id:'97',name:'癸未',cs:'墓'},
						 {id:'08',name:'甲申',cs:'绝'},{id:'211',name:'丙亥',cs:'绝'},{id:'411',name:'戊亥',cs:'绝'},{id:'62',name:'庚寅',cs:'绝'},{id:'85',name:'壬巳',cs:'绝'},{id:'19',name:'乙酉',cs:'绝'},{id:'30',name:'丁子',cs:'绝'},{id:'50',name:'己子',cs:'绝'},{id:'73',name:'辛卯',cs:'绝'},{id:'96',name:'癸午',cs:'绝'},
						 {id:'09',name:'甲酉',cs:'胎'},{id:'20',name:'丙子',cs:'胎'},{id:'40',name:'戊子',cs:'胎'},{id:'63',name:'庚卯',cs:'胎'},{id:'86',name:'壬午',cs:'胎'},{id:'18',name:'乙申',cs:'胎'},{id:'311',name:'丁亥',cs:'胎'},{id:'511',name:'己亥',cs:'胎'},{id:'72',name:'辛寅',cs:'胎'},{id:'95',name:'癸巳',cs:'胎'},
						 {id:'010',name:'甲戌',cs:'养'},{id:'21',name:'丙丑',cs:'养'},{id:'41',name:'戊丑',cs:'养'},{id:'64',name:'庚辰',cs:'养'},{id:'87',name:'壬未',cs:'养'},{id:'17',name:'乙未',cs:'养'},{id:'310',name:'丁戌',cs:'养'},{id:'510',name:'己戌',cs:'养'},{id:'71',name:'辛丑',cs:'养'},{id:'94',name:'癸辰',cs:'养'},
						 ]
			var csngnz=this.ngindex.toString()+this.nzindex.toString()
			var csygyz=this.ygindex.toString()+this.yzindex.toString()
			var csrgrz=this.rgindex.toString()+this.rzindex.toString()
			var cssgsz=this.sgindex.toString()+this.szindex.toString()
			var csngnzdata= csarr.filter(function(item){
			     return item.id == csngnz; 
			})
			var csygyzdata= csarr.filter(function(item){
			     return item.id == csygyz; 
			})
			var csrgrzdata= csarr.filter(function(item){
			     return item.id == csrgrz; 
			})
			var cssgszdata= csarr.filter(function(item){
			     return item.id == cssgsz; 
			})
					
			this.ncs=csngnzdata[0].cs
			this.ycs=csygyzdata[0].cs
			this.rcs=csrgrzdata[0].cs
			this.scs=cssgszdata[0].cs
		},
		methods: {
			change(e) {
				let {
					index
				} = e.detail
				console.log(index)
			}
		}
	}
</script>

<style>

</style>
